const mongoose = require('mongoose');
const { Schema } = mongoose;
//订单表

const serviceDetailSchema = new Schema({
  serviceId: String,//服务id
  materialId: String,//材料id
  number: Number,//材料数量
})

const orderSchame = new Schema({
  id: String,//订单编号
  status: String,//状态
  beautyProgress: Number,//美容进度
  agreeTime: Date,//预约时间
  startTime: Date,//发起时间
  endTime: Date,//结束时间
  cost: Number,//金额
  customer: String,//发起人
  serviceList: [serviceDetailSchema],//服务名称
});


const orderModel = mongoose.model('order',orderSchame);

module.exports = orderModel;